package com.meiyou.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.meiyou.mapper.MeiyouYhaskMapper;
import com.meiyou.mapper.MeiyouYuehuiMapper;
import com.meiyou.mapper.UserMapperCustom;
import com.meiyou.pojo.MeiyouYhask;
import com.meiyou.pojo.MeiyouYuehui;
import com.meiyou.pojo.MeiyouYuehuiExample;
import com.meiyou.pojo.YuehuiDetails;
import com.meiyou.pojo.vo.YuehuiApplyVo;
import com.meiyou.pojo.vo.YuehuiVo;
import com.meiyou.service.YueHuiService;

@Service
public class YueHuiServiceImpl implements YueHuiService {
	@Resource
	private MeiyouYuehuiMapper meiyouYuehuiMapper;
	@Resource
	private UserMapperCustom userMapperCustom;
	@Resource
	private MeiyouYhaskMapper meiyouYhaskMapper;
	


	
	public int insYueHui(MeiyouYuehui meiyouYuehui) {
		return meiyouYuehuiMapper.insert(meiyouYuehui);
	}

	
	public List<YuehuiVo> selYuehuiVo(String yUcount) {
		return meiyouYuehuiMapper.selYuehuiVo(yUcount);
	}

	
	public List<YuehuiVo> selMyYueHui(String uCount) {
		return meiyouYuehuiMapper.selMyYuehui(uCount);
	}

	
	public int delYueHui(int id) {
		MeiyouYuehuiExample example = new MeiyouYuehuiExample();
		example.createCriteria().andYIdEqualTo(id);
		return meiyouYuehuiMapper.deleteByPrimaryKey(id);
	}

	
	public List<MeiyouYuehui> selAllYueHui(String yUCount) {
		 return meiyouYuehuiMapper.selectAllYueHui(yUCount);
	}

	
	public MeiyouYuehui selYueHuiById(int yId) {
		return meiyouYuehuiMapper.selYueHuiById(yId);
	}

	
	public List<MeiyouYuehui> showYueHui(MeiyouYuehui meiyouYuehui) {
		return meiyouYuehuiMapper.selectYueHui(meiyouYuehui);
	}

	
	public YuehuiDetails selDetails(int yId) {
		 return meiyouYuehuiMapper.selDetails(yId);
	}

	
	public int insYhask(MeiyouYhask meiyouYhask) {
		return meiyouYhaskMapper.insert(meiyouYhask);
	}

	
	public List<YuehuiVo> selYuehuiVoTerm(String yUcount,String ySex) {
		return meiyouYuehuiMapper.selYuehuiVoTerm(yUcount,ySex);
	}

	
	public List<YuehuiApplyVo> selMyYhApply(String uCount) {
		return meiyouYuehuiMapper.selMyYhApply(uCount);
	}

	public List<YuehuiVo> selYhask(int yId) {
		return meiyouYuehuiMapper.selYhask(yId);
	}

	
	public int updState(int yId) {
		return meiyouYhaskMapper.updState(yId);
	}

	
	public int selYuehuiAssess(int yId) {
		return meiyouYuehuiMapper.selYuehuiAssess(yId);
	}

	
	public int updYuehuiAssess(int yAssess, int yId) {
		return meiyouYuehuiMapper.updAssess(yAssess, yId);
	}
}
